<!-- Recent Post -->
<div class="col-lg-12">
    <h4 class="recent-title"> Most recent post</h4>
    <hr class="recent-hr">
    {% for post in site.posts limit:5 %}
      <div class="recent">
          <a class="recent-item" href="{{ post.url | prepend: site.url }}"><span > {{ post.title }} </span></a>
      </div>
      <hr class="recent-hr">
    {% endfor %}
</div>



<!-- Categpry -->
<div class="col-lg-12">
    <h4 class="recent-title"> Category</h4>
    <hr class="recent-hr">

    {% assign categories_list = site.categories %}
      {% if categories_list.first[0] == null %}
        {% for category in categories_list %}
            <div class="recent">
                <a href="{{ category | prepend: '/category/' | prepend: site.url }}" class="recent-item"> {{ category | capitalize }} ({{ site.tags[category].size }})</a>
            </div>
            <hr class="recent-hr">
        {% endfor %}
      {% else %}
        {% for category in categories_list %}
            <div class="recent">
                <a href="{{ category[0] | prepend: '/category/' | prepend: site.url }}" class="recent-item"> {{ category[0] | capitalize }} ({{ category[1].size }})</a>
            </div>
            <hr class="recent-hr">
        {% endfor %}
      {% endif %}
   {% assign categories_list = nil %}
</div>



<!-- Tags -->
<div class="col-lg-12">
    <h4 class="recent-title"> Tags</h4>
    <div class="tags">
        {% for tag in site.tags %}
          {% assign t = tag | first %}
            {% assign posts = tag | last %}
                <a href="{{ t | prepend: '/tag/' | prepend: site.url }}"><span class="tag">{{t | downcase | replace:" ","-" }}</span></a>
        {% endfor %}
    </div>
</div>



<!-- Subscription -->
<div class="col-lg-12">
    <h4 class="recent-title">Never miss a post !</h4>
    <div id="mc_embed_signup">
        <form action="//github.us15.list-manage.com/subscribe/post?u=1bbd7132801a87ab5a48e2193&amp;id=d329b82930" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
            <div id="mc_embed_signup_scroll">
                <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
                <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_1bbd7132801a87ab5a48e2193_d329b82930" tabindex="-1" value=""></div><br>
                <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
            </div>
        </form>
    </div>
</div>
